home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7947 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: newsfeed.kdcol.net!usenet
  2. From: eriko@axtech.com (Erik Olson)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: CTime (VC++ 4.0)
  5. Date: Thu, 15 Feb 1996 13:39:53 GMT
  6. Organization: Axiom Technologies
  7. Message-ID: <312336a1.53641712@server1>
  8. References: <mictaliDMrpvr.6n0@netcom.com>
  9. Reply-To: eriko@axtech.com
  10. NNTP-Posting-Host: s25.cs00.io.kdcol.net
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. On Wed, 14 Feb 1996 13:38:14 GMT, mictali@netcom.com (Jere McDevitt)
  14. wrote:
  15.  
  16. >I have some databases that have tables using a DateTime sql type.  When I
  17. >bind these fields to controls they always bind to a CTime type only.  The
  18. >problem I have is that when setting the date of a CTime, it uses mktime
  19. >which has a base year of 1970 so entering any birthdates prior to 1970 fail.
  20. >
  21. >Anyone have any suggestions for getting around this problem, short of
  22. >re-doing the libraries?
  23. >
  24. >Is there another way of choosing the base time at ClassWizard create time
  25. >other than going into the .H file and changing it manually?
  26. >
  27.  
  28. If you're using RFX_Date to exchange the data, you might want to
  29. consider using a TIMESTAMP_STRUCT instead of a CTime.  This method
  30. enables you to deal with much broader time ranges at the cost of
  31. losing your Class Wizard support. RFX_Date is overloaded to take a
  32. reference to either type, so your code changes will be minimal. See KB
  33. Article Q114961 or the VC docs on RFX_Date for more info.
  34.  
  35. Erik
  36.  
  37.